This is a simple program to simulate the game of life. In this game, cells either live, die, or are born. Cells die if they are over-populated or if they are over-exposed. They are born if they are neither over-populated or over-exposed. You can set these values in the dialog. The values range from 0 to 8.
The program calculates each cell’s population density by counting the cells immediately surrounding it. This program uses a 100 x 100 grid, with 10,000 cells. To do the simulation, the Cell Window MUST be active. Otherwise it will just sit there. It may be a little slow in reacting to the mouse, as it must go through a whole cycle before it retrieves events.
To use the source, you must make a project file that contains:
The 7 source files
The 4 #include’s
MacTraps
“Cell π.Rsrc” must be present for it to run
I made little attempt to make the source neat so you might have trouble reading it. If you have questions, you can send them to KenP6 on America Online or peffers@chowder.rutgers.edu on the internet. I don’t guarantee and answer.